package com.xindong.paking.utils;

public class ResultUtil {
    private ResultUtil(){
    }
    public static Result success(){
        return new Result(ResultStatus.SUCCESS);
    }
    public static Result success(Object data){

        return new Result(ResultStatus.SUCCESS,data);
    }
    public static Result error(){
        return new Result(ResultStatus.ERROR);
    }
    public static Result error(Object data){
        return new Result(ResultStatus.ERROR,data);
    }
    public static Result error(ResultStatus resultStatus){
        return new Result(resultStatus);
    }
    public static Result error(ResultStatus resultStatus, Object data){
        return new Result(resultStatus,data);
    }

    public static Result userLoginError(){
        return new Result(ResultStatus.USER_LOGIN_ERROR);
    }
    public static Result userLoginError(Object data){
        return new Result(ResultStatus.USER_LOGIN_ERROR,data);
    }

    public static Result userPasswordError(){
        return new Result(ResultStatus.USER_PASSWORD_ERROR);
    }
    public static Result userPasswordError(Object data){
        return new Result(ResultStatus.USER_PASSWORD_ERROR,data);
    }

    public static Result userAccountForbidden(){
        return new Result(ResultStatus.USER_ACCOUNT_FORBIDDEN);
    }
    public static Result userAccountForbidden(Object data){
        return new Result(ResultStatus.USER_ACCOUNT_FORBIDDEN,data);
    }

    public static Result success(ResultStatus resultStatus, Object data){
        return new Result(resultStatus,data);
    }

    public static Result categoryError(){
        return new Result(ResultStatus.SPECIFIED_QUESTIONED_CATEGORY_NOT_EXIST);
    }
    public static Result categoryError(Object data){
        return new Result(ResultStatus.SPECIFIED_QUESTIONED_CATEGORY_NOT_EXIST,data);
    }

    public static Result userNotFound(){
        return new Result(ResultStatus.USER_NOT_EXIST);
    }
    public static Result userNotFound(Object data){
        return new Result(ResultStatus.USER_NOT_EXIST,data);
    }

    public static Result notDoneAdmin(){
        return new Result(ResultStatus.SPECIFIED_QUESTIONED_ADNIN_FORBID_DEL);
    }
    public static Result notDoneAdmin(Object data){
        return new Result(ResultStatus.SPECIFIED_QUESTIONED_ADNIN_FORBID_DEL,data);
    }

    public static Result zhanHaoNotFind(){
        return new Result(ResultStatus.USER_LOGIN_ERROR);
    }
    public static Result zhanHaoNotFind(Object data){
        return new Result(ResultStatus.USER_LOGIN_ERROR,data);
    }
    public static Result passwordError(){
        return new Result(ResultStatus.USER_PASSWORD_ERROR);
    }
    public static Result passwordError(Object data){
        return new Result(ResultStatus.USER_PASSWORD_ERROR,data);
    }

    public static Result notCanUse(){
        return new Result(ResultStatus.USER_ACCOUNT_FORBIDDEN);
    }
    public static Result notCanUse(Object data){
        return new Result(ResultStatus.USER_ACCOUNT_FORBIDDEN,data);
    }

    //PERMISSION_NO_ACCESS
    public static Result permissionNoAccess(){
        return new Result(ResultStatus.PERMISSION_NO_ACCESS);
    }
    public static Result permissionNoAccess(Object data){
        return new Result(ResultStatus.PERMISSION_NO_ACCESS,data);
    }


    public static Result carouselError(){
        return new Result(ResultStatus.SPECIFIED_QUESTIONED_CAROUSEL_NOT_EXIST);
    }
    public static Result carouselError(Object data){
        return new Result(ResultStatus.SPECIFIED_QUESTIONED_CAROUSEL_NOT_EXIST,data);
    }

    //PARAM_IS_BLANK
    public static Result paramIsBlank(){
        return new Result(ResultStatus.PARAM_IS_BLANK);
    }
    public static Result paramIsBlank(Object data){
        return new Result(ResultStatus.PARAM_IS_BLANK,data);
    }


    //PERMISSION_NOT_ADMIN
    public static Result puTonguserNotDone(){
        return new Result(ResultStatus.PERMISSION_NOT_ADMIN);
    }
    public static Result puTonguserNotDone(Object data){
        return new Result(ResultStatus.PERMISSION_NOT_ADMIN,data);
    }

    public static Result notUpadeAdimn(){
        return new Result(ResultStatus.PERMISSION_NO_ADMIN);
    }
}
